<!doctype html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>按钮</title>
  <style>
    body {
      height: 100vh;
      background-color: #f6f0df;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
    }

    .btn {
      width: 100px;
      height: 50px;
      border-radius: 10px;
      position: relative;
      cursor: pointer;
    }

    .btn-b {
      border: 3px solid rgb(0, 0, 0);
      width: 100%;
      height: 100%;
      border-radius: inherit;
      background-color: #000;
    }

    .btn-c {
      border: 3px solid black;
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: inherit;
      background-color: rgb(204, 204, 255);
      transform: translate(-6px, -6px);
      display: flex;
      justify-content: center;
      align-items: center;
      transition: transform 0.3s ease;
      color: white;
    }

    .btn:hover .btn-c {
      transform: translate(0, 0);
    }
  </style>
</head>

<body>
  <div class="btn">
    <div class="btn-c">按钮</div>
    <div class="btn-b"></div>
  </div>
</body>

</html>